<extend name="../Public/base" />
<block name="title"><title>存储设置</title></block>
<block name="body">
    <form class="form form-horizontal" id="form-config-add" method="post">

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">存储方式：</label>
            <div class="formControls col-xs-8 col-sm-9">
                 <span class="select-box wp30">
                    <select class="select" name="type">
                        <option value="Local" <if condition="$detail.type eq 'Local'">selected</if>>默认方式（本地存储）</option>
                        <option value="Qiniu" <if condition="$detail.type eq 'Qiniu'">selected</if>>七牛云存储</option>
                    </select>
                </span>
                <span class="c-white ml-10" style="display:inline;background-color:#5eb95e">注意：</span><span class="c-999">以下设置只针对七牛云存储方式</span>
            </div>

        </div>

        <div id="tab-system" class="HuiTab mt-20">
            <div class="tabBar cl"><span>七牛云存储设置</span><span>原图保护设置</span></div>
            <div class="tabCon">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">AccessKey：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[accessKey]" value="{$detail.Qiniu.accessKey}" class="input-text wp30">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">SecretKey：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[secretKey]" value="{$detail.Qiniu.secretKey}" class="input-text wp30">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">上传域名：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[upHost]" value="{$detail.Qiniu.upHost}" class="input-text wp30">
                    </div>
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                        <span class="label label-warning radius ">注意：</span>
                        <span class="c-999">
                        七牛不同存储区域上传域名不一样，根据您空间的存储区域,设置不同的域名；
                        华东：http://up.qiniu.com,华北：http://up-z1.qiniu.com;
                        默认为华东；
                        </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">域名协议：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                         <span class="select-box wp30">
                            <select class="select" name="Qiniu[setting][protocol]">
                                <option value="http" <if condition="$detail['Qiniu']['setting']['protocol'] eq 'http'">selected</if>>http</option>
                                <option value="https" <if condition="$detail['Qiniu']['setting']['protocol'] eq 'https'">selected</if>>https</option>
                            </select>
                        </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">空间域名：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[domain]" value="{$detail.Qiniu.domain}" class="input-text wp30">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">空间名称：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[bucket]" value="{$detail.Qiniu.bucket}" class="input-text wp30">
                    </div>
                </div>
            </div>
            <div class="tabCon">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">原图保护：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                         <span class="select-box wp30">
                            <select class="select" name="Qiniu[setting][enable_picture_protect]">
                                <option value="0" <if condition="$detail['Qiniu']['setting']['enable_picture_protect'] eq '0'">selected</if>>关闭</option>
                                <option value="1" <if condition="$detail['Qiniu']['setting']['enable_picture_protect'] eq '1'">selected</if>>开启</option>
                            </select>
                        </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">样式分隔符：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[setting][style_separator]" value="{$detail.Qiniu.setting.style_separator}" class="input-text wp30">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">样式-水印：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[setting][styles][watermark]" value="{$detail.Qiniu.setting.styles.watermark}" class="input-text wp30">
                    </div>
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                        <span class="label label-warning radius ">注意：</span>
                        <span class="c-999">
                        请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置
                        </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">样式-头像：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[setting][styles][avatar]" value="{$detail.Qiniu.setting.styles.avatar}" class="input-text wp30">
                    </div>
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                        <span class="label label-warning radius ">注意：</span>
                        <span class="c-999">
                        请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置处理接口:
                        imageView2/1/w/100/h/100/interlace/0/q/100
                        </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">样式-缩略图120x120：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[setting][styles][thumbnail120x120]" value="{$detail.Qiniu.setting.styles.thumbnail120x120}" class="input-text wp30">
                    </div>
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                        <span class="label label-warning radius ">注意：</span>
                        <span class="c-999">
                        请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置处理接口:
                        imageView2/1/w/120/h/120/interlace/0/q/100
                        </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">样式-缩略图300x300：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[setting][styles][thumbnail300x300]" value="{$detail.Qiniu.setting.styles.thumbnail300x300}" class="input-text wp30">
                    </div>
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                        <span class="label label-warning radius ">注意：</span>
                        <span class="c-999">
                        请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置
                        处理接口:
                        imageView2/1/w/300/h/300/interlace/0/q/100
                        </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">样式-缩略图640x640：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[setting][styles][thumbnail640x640]" value="{$detail.Qiniu.setting.styles.thumbnail640x640}" class="input-text wp30">
                    </div>
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                        <span class="label label-warning radius ">注意：</span>
                        <span class="c-999">
                        请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置
                        处理接口:
                        imageView2/1/w/640/h/640/interlace/0/q/100
                        </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">样式-缩略图1080x1080：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" name="Qiniu[setting][styles][thumbnail1080x1080]" value="{$detail.Qiniu.setting.styles.thumbnail1080x1080}" class="input-text wp30">
                    </div>
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                        <span class="label label-warning radius ">注意：</span>
                        <span class="c-999">
                        请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置
                        处理接口:
                        imageView2/1/w/1080/h/1080/interlace/0/q/100
                        </span>
                    </div>
                </div>

            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
                <button class="btn btn-default radius" type="reset">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</block>

<block name="js">
<script type="text/javascript">
    $(function(){
        $.Huitab("#tab-system .tabBar span","#tab-system .tabCon","current","click","0");
    });
</script>
</block>